import request from '../utils/request';

//登录
export async function login(data) {
    return request({
        url: '/user/login',
        method: 'post',
        data: data
    });
}

//注册
export async function register(data) {
    return request({
        url: '/user/register',
        method: 'post',
        data: data
    });
}

//查询用户信息
export async function getUserProfile(data) {
    return request({
        url: '/user/profile/' + data.cid,
        method: 'get'
    });
}

//修改用户信息
export async function updateUserProfile(data) {
    return request({
        url: '/user/profile',
        method: 'put',
        data:data
    });
}


